|1/2-2/3|+|2/3-3/4|+|3/4-4/5|+.......+|8/9-9/10|的结果
来源:百度知道 编辑:UC知道 时间:2024/05/15 06:40:19
我需要过程和结果.
我要的是计算过程,越简单越好
我要的是计算过程,越简单越好
计算过程~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|1/2-2/3|+|2/3-3/4|+|3/4-4/5|+.......+|8/9-9/10|
=2/3-1/2+3/4-3/2+5/4-3/4+……9/10-8/9
=9/10-1/2
=4/10
=0.4
*****************************************
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float f1=1.0,f2=2.0;
float sum=fabs(f1/f2-f2/(f2+1));
for(int i=2;i<9;i++)
{
f1=f2;
f2=f2+1;
sum=sum+fabs(f1/f2-f2/(f2+1));
}
cout<<"sum="<<sum<<endl;
}
***************************************
sum=0.4
Press any key to continue
#include <stdio.h>
#include <math.h>
#include <iostream.h>
float doit(int n)
{
if (n == 1)
{
return fabs(float(1)/float(2)-float(2)/float(3));
}
else
{
return ( fabs(float(n)/float(n+1)-
1/2-1/2=?
3/2=2+1/1*2=1/1+1/2
1/(x-2)+2/(x+1)-2/(x-1)-1/(x+2)
2/3,1/2,2/5,1/3,2/7 ()?
(1+1/2)(1+1/2^2)(1+1/2^4)(1+1/2^8)
(1-1/2^2)*(1-1/3^2)*(1-1/4^2).......(1-1/100^2)
1/2,3/2,1/5,-1/8,-2/13,(?)
1/1^2+1/2^2+...+1/n^2<2
1+2/1+2/2+2/1+3/1+3/2+3/3+3/2+3/1+......+100/1+100/2+......100/100+100/99+.....+100/1
1+1/(1+2)+1/(1+2+3)+...+1/(1+2+3+...+100)